package com.ijunfu.order.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;

/**
 * @Title :
 * @Remarks:
 * @Author : Weizhiguo
 * @Version: 1.0.0
 * @Date : 2022-05-08
 */
@Configuration
@EnableSwagger2WebMvc
public class Knife4jConfig {

    @Bean("order-service")
    public Docket userService() {
        return new Docket(DocumentationType.SWAGGER_2)
                .groupName("03.OrderService")
                .select()
                .apis(RequestHandlerSelectors.basePackage("com.ijunfu.order.controller"))
                .paths(PathSelectors.any())
                .build();
    }
}
